package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

@TableName("t_user")
public class UserBean {
    @TableId(value = "pk_userId", type = IdType.AUTO)
    private Integer id;

    @TableField("u_name")
    private String username;

    @TableField("u_pwd")
    private String password;

    @TableField("u_email")
    private String email;

    @TableField("u_imgPath")
    private String imgPath;

    @TableField("u_createDate")
    private LocalDate createDate =LocalDate.now();

    public UserBean() {
    }

    public UserBean(String username, String password, String email, String imgPath, LocalDate createDate) {
        this.username = username;
        this.password = password;
        this.email = email;
        this.imgPath = imgPath;
        this.createDate = createDate;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", imgPath='" + imgPath + '\'' +
                ", createDate=" + createDate +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }
}